import React,{Component} from "react";

import {Icon} from "antd-mobile"
// import logo from "../../assets/images/logo.png"
import "./header.css"

import {withRouter} from "react-router-dom"

class MySearchBar extends Component {
    
    switchToSearch(){
       let that =this
      setTimeout(function(){
        that.props.history.push("/search")
      },500)
    }

    switchToBroadcast(){
        this.props.history.push("/BroadCast")
    }
    render(){
        return(
            <div className="MySearchBar">
                 <div className="SearchLeft">
                     {/* <img src={logo} /> */}
                 </div>
                 <div className="SearchMain" onClick={this.switchToSearch.bind(this)}>
                     <div className="SearchInner">
                       <Icon type="search" />
                       <span>猜你喜欢</span>
                        <span>&nbsp;晴天</span>
                     </div>
                 </div>
                 <div className="SearchRight" onClick={this.switchToBroadcast.bind(this)}>
                 <span className="iconfont">&#xe7bc;</span>
                 </div>
            </div>
        )
    }
}

export default  withRouter(MySearchBar)